<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="follow, index" />
<meta name="author" content="iune co." />
<meta name="description" content="IUNE有最好的库存管理SaaS软件。以更快更高的准确度，跟进实时数据的访问和库存移动。" />
<meta name="keywords" content="库存, 存货管理, 库存管理, 仓库管理, 云ERP, 云逸ERP, 中小型企业云ERP, SaaS ERP软件/系统" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>

<link rel="icon" href="images/favicon.ico" />

<!-- 
<link href="./node_modules/pace-js/themes/blue/pace-theme-center-circle.css" rel="stylesheet">
 -->
<link href="./node_modules/pace-js/themes/blue/pace-theme-flash.css" rel="stylesheet">
<script src="./node_modules/pace-js/pace.min.js"></script>

<link href="./node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<!-- Bootstrap -->
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="./node_modules/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="./node_modules/angular-ui-bootstrap/dist/ui-bootstrap-csp.css" rel="stylesheet">
<link href="./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
<link href="./node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" rel="stylesheet">

<!-- 
<link href="/u2/app/plugins/bootstrap-treeview/dist/bootstrap-treeview.min.css" rel="stylesheet">
<link href="./node_modules/angularjs-bootstrap-datepicker/dist/css/angularjs-bootstrap-datepicker.css" rel="stylesheet">
<link href="./plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link href="./node_modules/summernote/dist/summernote.css" rel="stylesheet" />
 -->

<link href="./css/app.css" rel="stylesheet">
<link href="./css/panelMenu.css" rel="stylesheet">

<link href="./js/_directives/treeView.css" rel="stylesheet">

<style type="text/css">

.loading {
	background: #00000040 url(../appcenter/images/loading.gif) no-repeat center 50%;
	z-index: 9999;
}


html,body{ 
	margin:0px; height:100%; 
}


html{overflow:hidden;}

#window{
	padding:0px;
}
#col-left,#col-left2{
	padding:0px;
}
#main-left,#main-left2{
	padding:0px;
}
#col-center{
	padding:0px;
}
#main-center{
	padding:0px;
}
#nav-center{
	margin:0px;
}
#nav-left,#nav-left{
	margin:0px;
	/* background-color:red; */
}
.col-content{
	padding:1px;
}





/*
 * Grid examples
 *
 * Highlight the grid columns within the docs so folks can see their padding,
 * alignment, sizing, etc.
 */

.show-grid {
  margin-bottom: 15px;
}
.show-grid [class^="col-"] {
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: #eee;
  background-color: rgba(86,61,124,.15);
  border: 1px solid #ddd;
  border: 1px solid rgba(86,61,124,.2);
}


</style>

	
	<script data-main="./main" src="require.js"></script>

</head>

<body data-ng-controller="appCtrl as Model" data-ng-init="bodyInit()">

	<div class="container-fluid text-center">
		<!-- 遮罩层模态框（Modal） -->
		<div class="modal fade loading" id="loadingModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
			// data-backdrop="static" data-keyboard="false" // 以上属性是静止掉了模态框的关闭按钮和点击空白处关闭模态框
			遮罩层
		</div>
	</div>


	<input type="text" id="psmid" value="${psmid}" style="display: none" />
	<div id="loading" style="text-align:center;display:none ">
		<p>首次加载需要缓存，可能需要较长时间......</p>
		<img src="images/paas.gif" />
	</div>

	
	<div id="globalAlert" style="right:0px;position:absolute;z-index:100;width:350px;">
	  <alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)" dismiss-on-timeout="2000"><span ng-bind="alert.msg"></span></alert>
	</div>


	<div class="container-fluid" style="display: none" id="window">

		<div class="row-fluid">
		
			<div id="col-left" class="col-sm-2"	ng-show="showLeft">
				<aside>
					<div id="main-left">
		
						<nav class="navbar navbar-default alert-info" id="nav-left">
							<div class="container-fluid">
								<div class="navbar-header">
									<a class="navbar-brand" href=""  data-ng-click="activeTab('home')"> <i class="fa fa-sitemap fa-lg"></i>  {{$root.dataPsm.ognName}}</a>
								</div>
							</div>
						</nav>
						
						<ul class="nav nav-tabs" role="tablist">
						  <li role="presentation" ng-click="navTabsClick(row)" ng-class="{'active':row.active==true}" ng-repeat="row in navTabsData"><a href="#">{{row.label}}</a></li>
						</ul>
		
						<div ng-show="navTabsData[0].active" id="treeNavigation">
							<div tree-view tree-data="dataSysInfo" 
								template-url="./js/_directives/treeMenu.html" 
								checkbox-show="false"
								text-field="systemName" 
								value-field='fID' 
								parent-field='fParent'
								level-field='nodeLevel' 
								kind-field='nodeKind' 
								on-row-clicked="Model.treeRowClick(event)"
								on-row-dbl-clicked="Model.treeRowDblClick(event)"
								icon-expression="{'fa-cubes':row.systemKind.value=='app','fa-cube':row.systemKind.value=='fun','fa-list-alt':row.systemKind.value=='pag','fa-hdd-o':row.systemKind.value=='act'}"
								>
							</div>
							<br>
							<br>
							
						</div>
						<div ng-show="navTabsData[1].active">
							<ul class="topmenu">
								<li class="topmenuli" ng-repeat="row in dataSysInfo.rows | filter : {nodeLevel:{value:1}}" on-finish-render-filters>
								<a href="">{{row.systemName.value}}</a>
								<b><a href="#"></a></b>
									<div class="submenu">
										<div class="page-header">
										  <h1>&nbsp&nbspU2生产管理系统 <small>进销存+工厂管理</small></h1>
										</div>
									
										<div class="leftdiv">
											<dl ng-repeat="row2 in dataSysInfo.rows | filter : {nodeLevel:{value:2}}  | filter :  {fParent:{value:row.fID.value}} ">
												<dt><a href="">{{row2.systemName.value}}</a></dt>
												<dd>
													<a href="#" ng-click="Model.panelItemClick(row3)" ng-repeat="row3 in dataSysInfo.rows | filter : {nodeLevel:{value:3}}  | filter :  {fParent:{value:row2.fID.value}}">{{row3.systemName.value}}</a>
												</dd>
											</dl>
										</div>
										<div class="rightdiv">
											<dl>
												<dd>
													<a href="">
														<img src="images/10.png">
													</a>
												</dd>
												<dd>
													<a href="">
														<img src="images/12.png" width="194" height="70" title="广告">
													</a>
												</dd>
											</dl>
											<dl>
												<dt>产品特点</dt>
												<dd>
													<a href="#">无需安装运维</a>
												</dd>
												<dd>
													<a href="#">注册即可使用</a>
												</dd>
											</dl>
											<img class="righrPic" src="images/c.png">
										</div>
									</div>
								</li>
							</ul>
						</div>
						
						
					</div>
				</aside>
			</div>
		
			<div id="col-left2" class="col-sm-1" ng-show="showLeft2">
				<aside>
					<div id="main-left2">
		
						<nav class="navbar navbar-default alert-info" id="nav-left2">
							<div class="container-fluid">
								<div class="navbar-header">
									<a class="navbar-brand" href=""  data-ng-click="activeTab('home')"> <i class="fa fa-sitemap fa-lg"></i>  U2</a>
								</div>
							</div>
						</nav>
						
						<ul class="topmenu">
							<li class="topmenuli" ng-repeat="row in dataSysInfo.rows | filter : {nodeLevel:{value:1}}" on-finish-render-filters>
								<a href="" title="{{row.systemName.value}}" style="font-size:24px;">{{row.systemCode.value}}</a><span></span>
								<b><a href="#"></a></b>
								<div class="submenu">
									<div class="page-header">
									  <h1>&nbsp&nbspU2生产管理系统 <small>{{row.systemName.value}}</small></h1>
									</div>
								
									<div class="leftdiv">
										<dl ng-repeat="row2 in dataSysInfo.rows | filter : {nodeLevel:{value:2}}  | filter :  {fParent:{value:row.fID.value}} ">
											<dt><a href="">{{row2.systemName.value}}</a></dt>
											<dd>
												<a href="#" ng-click="Model.panelItemClick(row3)" ng-repeat="row3 in dataSysInfo.rows | filter : {nodeLevel:{value:3}}  | filter :  {fParent:{value:row2.fID.value}}">{{row3.systemName.value}}</a>
											</dd>
										</dl>
									</div>
									<div class="rightdiv">
										<dl>
											<dd>
												<a href="">
													<img src="images/10.png">
												</a>
											</dd>
											<dd>
												<a href="">
													<img src="images/12.png" width="194" height="70" title="广告">
												</a>
											</dd>
										</dl>
										<dl>
											<dt>产品特点</dt>
											<dd>
												<a href="#">无需安装运维</a>
											</dd>
											<dd>
												<a href="#">注册即可使用</a>
											</dd>
										</dl>
										<img class="righrPic" src="images/c.png">
									</div>
								</div>
							</li>
						</ul>
						
					</div>
				</aside>
			</div>

			<div id="col-center" ng-class="{'col-sm-10':showLeft==true,'col-sm-11':showLeft==false}">
			
				<!-- <button class="btn" data-ng-click="alert()">alertTest</button> -->
				<header>
					<div class="container-fluid">
						<div class="row">
							<div class="col-sm-12" style="padding:0px">
						
								<nav id="nav-center" class="navbar navbar-default alert-info">
								  <div class="container-fluid">
								    <!-- Brand and toggle get grouped for better mobile display -->
								    <div class="navbar-header">
								      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
								        <span class="sr-only">Toggle navigation</span>
								        <span class="icon-bar"></span>
								        <span class="icon-bar"></span>
								        <span class="icon-bar"></span>
								      </button>
							      	  <a class="navbar-brand" href="" ng-click="showLeftClick()"> 
							      	  	<i ng-if="showLeft==true" class="glyphicon glyphicon-step-backward"></i> 
							      	  	<i ng-if="showLeft2==true" class="glyphicon glyphicon-step-forward"></i> 
							      	  </a>
								    </div>
								
								    <!-- Collect the nav links, forms, and other content for toggling -->
								    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
								      <ul class="nav navbar-nav">
								      
								      
								        <li class="dropdown " style="background-color:white;">
								          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="glyphicon glyphicon-list-alt"></i> {{winname}} <span class="caret"></span> </a>
								          <ul class="dropdown-menu">
								            <li data-ng-repeat="win in wins">
								            <a href="#" data-ng-click="$root.activeTab(win.winid,win.winParams)"><i class="glyphicon glyphicon-list-alt"></i> {{win.winname}}</a>
								            </li>
								          </ul>
								        </li>
								      </ul>
								      
								     
								      <ul class="nav navbar-nav navbar-right">
								        <li class="dropdown" data-ng-show="false">
								          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">当前 <span class="caret"></span></a>
								          <ul class="dropdown-menu">
											<li><a href="">{{getPersonMemberFName()}}</a></li>
											<li><a href="">{{getCurrentOgnFName()}}</a></li>
											<li><a href="">{{getCurrentOgnName()}}</a> </li>
								          </ul>
								        </li>
							
										<li>
										<a data-toggle="collapse" href="#shortcutMenu" aria-expanded="false" aria-controls="collapseExample">
										  <span class="glyphicon glyphicon-heart"></span> 快捷菜单
										</a>
										</li>
							
							
										<!-- 
								        <li><a href="#"><span class="glyphicon glyphicon-envelope"></span> 消息 <span class="badge">42</span></a></li>
								         -->
								        
								        <li class="dropdown" title="${sFName}">
								          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-cog fa-lg"></i> {{$root.dataPsm.sFName}}<span class="caret"></span></a>
								          <ul class="dropdown-menu">
								    		<li><a href="" ng-click="Model.getPsmList()"><span class="glyphicon glyphicon-retweet"></span> 切换身份</a></li>
								            <li role="separator" class="divider"></li>
								            <li><a href="{{$root.getProjectName()}}/codeout"><i class="fa fa-power-off"></i> 退出登录</a></li>
								          </ul>
								        </li>
								        
								        <li style="background-color:red;"><a href="" data-ng-show="$root.winid!='home'" title="关闭当前子窗口" data-ng-click="$root.removeTab($root.winid)"><span class="glyphicon glyphicon-remove"></span> <span class="sr-only">(current)</span></a></li>
								      
								      </ul>
								    </div><!-- /.navbar-collapse -->
								  </div><!-- /.container-fluid -->
								</nav>

							</div>
						</div>
					</div>
				</header>


				<!-- <div data-ng-view ></div> -->
				<section>
				
					<div id="main-center">
											
	<div class="container-fluid" ng-if="showPsmList">
		<div class="modal-header">
			<h3>选择身份</h3>
		</div>
		<div class="modal-body">

			<form class="form-horizontal">
				<div class="row">
					<div class="col-sm-12">
						<div class="panel panel-info">
						  <div class="panel-heading">
						    <h3 class="panel-title">登录应用中心</h3>
						  </div>
						  <div class="panel-body">
										
							<div class="row">
							  <div class="col-sm-12 col-md-12" data-ng-repeat="row in $root.dataPsms">
							    <div class="thumbnail">
							      <div class="caption">
							        <h4>组织关系：{{row.sFName}}</h4>
							        <a href="" ng-click="Model.grant(row)" class="btn btn-primary" role="button"><i class="fa fa-user fa-3x"></i> 以此身份进入应用中心</a>
							      </div>
							    </div>
							  </div>
							  
							</div>		
							
						  </div>
						</div>		
				    </div>
				</div>
			</form>

		</div>
		<div class="modal-footer">
			<span class="bg-warning pull-left">在商户后台管理人员组织关系！</span>
			<button class="btn btn-warning" data-ng-click="Model.hidePsmList()">关闭</button>
		</div>
	</div>
					
						<!-- Nav tabs -->
						<div u2frame  ng-hide="showPsmList">
							<ul id="tabnav" class="nav nav-tabs" role="tablist" data-ng-show="false">
								<!-- 
								<li role="presentation" class="active">
									<a href="#homec" data-ng-click="activeTab('home')" aria-controls="homec" role="tab" data-toggle="tab">首页</a>
								</li>
								 -->
							</ul>

							<!-- Tab panes -->
							<div id="tabcontent" class="tab-content">
								<!-- 
								<div role="tabpanel" class="tab-pane active" id="homec">
									<div data-ng-include data-src="''"></div>

								</div>
								 -->
							</div>
						</div>
						
					</div>
					
				</section>
			</div>

		</div>
	</div>


	<footer></footer>



	<script type="text/javascript">
	/* 
	alert('h');
	 */
	window.onload=function()//用window的onload事件，窗体加载完毕的时候
	{
			
		//do something
		//document.getElementById('loading').style.display = "none";
		//document.getElementById('window').style.display = "";
		
// 			var Lis=document.getElementsByTagName('li');
 			var Lis=document.getElementsByClassName('topmenuli');
 			for(i=0;i<Lis.length;i++){
 				Lis[i].i=i;
 				Lis[i].onmouseover=function(){
// 		            this.className="lihover";
 		            $(this).addClass("lihover");
 					var h0=(this.i-1)*30+42;
 					var y=this.getElementsByTagName("div")[0].offsetHeight;
 					var h=this.getElementsByTagName("div")[0].style.top+y;
 					if(h<h0){
 						this.getElementsByTagName("div")[0].style.top=h0+"px";
 					}
 					if(y>550){
 						this.getElementsByTagName("div")[0].style.top=3+"px";
 					}
 				}
 				Lis[i].onmouseout=function(){
 					$(this).removeClass("lihover");
 				}
 				////////////////////////////////////////
 				Lis[i].onclick=function(){
 					$(this).removeClass("lihover");
 				}
 				////////////////////////////////////////
 			}
		 
	}
	</script>



</body>

</html>

